
use "/Users/donkeylovebear/Desktop/Research/Cause of terrorist group formation/Working data/Data_June24.dta"

label variable lngdppc "GDP per capita"
label variable lngdppc2 "GDP per capita square"
label variable lnpop "Population"
label variable polity2 "Polity"
label variable politysq "Polity square"
label variable competorg "Other groups"
label variable war_intra "Intrastate wars"
label variable megdp "ME share"
label variable sf "State failure"


** Table 1 **
outreg2 using sum.xls, replace sum(log) keep(lngdppc war_intra megdp neworg competorg polity2 lnpop sf)


/* Table 2 NB */


nbreg neworg lngdppc lngdppc2 lnpop polity2 politysq war_intra sf i.year i.ccode, vce(cluster ccode)
tab ccode if e(sample), nofreq
display r(r)
outreg2 using table1.xls, dec(3) label replace ctitle(Model 8) /* gdppc- gdppc pop polity politysq- trade */

nbreg neworg lngdppc lngdppc2 lnpop polity2 politysq war_intra sf competorg i.year i.ccode, vce(cluster ccode)
tab ccode if e(sample), nofreq
display r(r)
outreg2 using table1.xls, dec(3) label append ctitle(Model 8) /* gdppc- gdppc pop polity politysq- trade */

nbreg neworg lngdppc lngdppc2 lnpop polity2 politysq war_intra sf competorg megdp i.year i.ccode, vce(cluster ccode)
tab ccode if e(sample), nofreq
display r(r)
outreg2 using table1.xls, dec(3) label append ctitle(Model 8) /* gdppc- gdppc pop polity politysq- trade */




nbreg neworg lngdppc lngdppc2 lnpop polity2 war_intra sf i.year i.ccode, vce(cluster ccode)
tab ccode if e(sample), nofreq
display r(r)
outreg2 using table1.xls, dec(3) label append ctitle(Model 8) /* gdppc- gdppc pop polity politysq- trade */

nbreg neworg lngdppc lngdppc2 lnpop polity2 war_intra sf competorg i.year i.ccode, vce(cluster ccode)
tab ccode if e(sample), nofreq
display r(r)
outreg2 using table1.xls, dec(3) label append ctitle(Model 8) /* gdppc- gdppc pop polity politysq- trade */

nbreg neworg lngdppc lngdppc2 lnpop polity2 war_intra sf competorg megdp i.year i.ccode, vce(cluster ccode)
tab ccode if e(sample), nofreq
display r(r)
outreg2 using table1.xls, dec(3) label append ctitle(Model 8) /* gdppc- gdppc pop polity politysq- trade */











